search in a trie